﻿<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
    CodeFile="VIPMaintain.aspx.vb" Inherits="WebForm_Mail_VIPMaintain" %>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
        <contenttemplate>
            <asp:HiddenField ID="hiUID" runat="server" />
            <asp:HiddenField ID="hiDBName" runat="server" />
           
       <%--     <asp:ObjectDataSource ID="dbTemp" runat="server" SelectMethod="GetTempData" 
                TypeName="TempData"></asp:ObjectDataSource>
           --%>
            <table border="1" width="900px">
                <tr>
                    <td style="text-align: center" colspan="4">
                        <asp:Label ID="lblTitle" runat="server" meta:resourcekey="lblTitle" Font-Bold="True"
                            Font-Size="24px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblEmpID" runat="server" meta:resourcekey="lblEmpID"></asp:Label>
                    </td>
                    <td align="left">
                       <asp:TextBox ID="txtEmpID" runat="server"></asp:TextBox>
                    </td>
                    <td align="right">
                       <asp:Label ID="lblAgent" runat="server" meta:resourcekey="lblAgent"></asp:Label>
                    </td>
                    <td align="left">
                       <asp:TextBox ID="txtAgent" runat="server"></asp:TextBox>
                        <asp:Button ID="btnOpen" runat="server" Text="..." />
                    </td>
                </tr>
                <tr>
                    <td style="text-align: center"  colspan="4">
                        <asp:Button ID="btnInsert" runat="server"  meta:resourcekey="btnInsert"></asp:Button>
                        <asp:Button ID="btnQuery" runat="server"  meta:resourcekey="btnQuery"></asp:Button>
                    </td>
                </tr>
                <tr style="vertical-align: text-top" >
                    <td colspan="4">
                       
                        <TServerControl:TGridView ID="gvVIP" runat="server" Visible="false"
                            AllowHoverEffect="False" AllowHoverSelect="False" AllowPaging="True" 
                            AutoGenerateColumns="False" ShowFooterWhenEmpty="False" 
                            ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0" Width="900px">
                            <Columns>
                               <asp:TemplateField>
                                    <EditItemTemplate>
                                        <asp:Button ID="btnSave" runat="server" CommandName="Update" meta:resourcekey="btnSave"></asp:Button>
                                        <asp:Button ID="btnCancel" runat="server" CommandName="Cancel" meta:resourcekey="btnCancel"></asp:Button>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Button ID="btnEdit" runat="server" CommandName="Edit" meta:resourcekey="btnEdit"></asp:Button>
                                       
                                    </ItemTemplate>
                                </asp:TemplateField>
                               <asp:TemplateField>
                                    
                                    <ItemTemplate>
                                         <asp:Button ID="btnDelette" runat="server" CommandName="Delete" meta:resourcekey="btnDelette" CommandArgument='<%# Bind("Dept_ID") %>'></asp:Button>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvEmpID">
                                     <ItemTemplate>
                                        <asp:Label ID="lblgvEmpID" runat="server" Text='<%# Bind("emp_id") %>'></asp:Label>
                                     </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvEmpName">
                                      <ItemTemplate>
                                        <asp:Label ID="lblgvEmpName" runat="server" Text='<%# Bind("EmpName") %>'></asp:Label>
                                     </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvDep">
                                      <ItemTemplate>
                                        <asp:Label ID="lblgvDep" runat="server" Text='<%# Bind("Dept_ID") %>'></asp:Label>
                                        <asp:Label ID="lblgvDepName" runat="server" Text='<%# Bind("DepName") %>'></asp:Label>
                                     </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvAgentEmpID">
                                        <EditItemTemplate>
                                       <asp:TextBox ID="txtgvAgentEmpID" runat="server"  Text='<%# Bind("Agent_emp_id") %>'></asp:TextBox>
                                            <asp:Button ID="btnOpen" runat="server" CommandName="Open" Text="..." />
                                     </EditItemTemplate>
                                     <ItemTemplate>
                                       <asp:Label ID="lblgvAgentEmpID" runat="server" Text='<%# Bind("Agent_emp_id") %>'></asp:Label>
                                       <asp:Label ID="lblgvAgentEmpName" runat="server" Text='<%# Bind("AgentEmpName") %>'></asp:Label>
                                     </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvDeptAgent"> 
                                     <ItemTemplate>
                                        <asp:Label ID="lblgvDeptAgent" runat="server" Text='<%# Bind("DeptAgent") %>'></asp:Label>
                                        <asp:Label ID="lblgvDeptAgentName" runat="server" Text='<%# Bind("DeptAgentName") %>'></asp:Label>

                                     </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvModiDate"> 
                                     <ItemTemplate>
                                        <asp:Label ID="lbliModiDate" runat="server"  Text='<%# Eval("ModiDate","{0:yyyy/MM/dd HH:mm:ss}") %>'></asp:Label>
                                     </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="gvModiName"> 
                                      <ItemTemplate>
                                        <asp:Label ID="lbliModiUID" runat="server"  Text='<%# Eval("ModiName") %>'></asp:Label> 
                                     </ItemTemplate>
                                </asp:TemplateField>
                                
          <%--                      <asp:BoundField HeaderText="工號" DataField ="AAA"/>
                                <asp:BoundField HeaderText="姓名" />
                                <asp:BoundField HeaderText="部門" />
                                <asp:BoundField HeaderText="個人代理人" />
                                <asp:BoundField HeaderText="部門代理人" />
                                <asp:BoundField HeaderText="最後修改日期" />
                                <asp:BoundField HeaderText="最後修改人" />
                               --%>
                              
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" 
                                    meta:resourcekey="lblEmpty"></asp:Label>
                            </EmptyDataTemplate>
                        </TServerControl:TGridView>
                       
                    </td>
                </tr>
            </table>
       
                <asp:Panel ID="Panel1" runat="server"  BackColor="#E7FEC2"  BorderWidth="1" Style="cursor: move;" Width="600px" Height="120px">
                    <table style="text-align :center" border ="1" width ="600px">
                        <tr>
                            <td align="right">
                                <asp:Label ID="lblVipEmpID" runat="server" meta:resourcekey="lblVipEmpID"></asp:Label>
                            </td>
                            <td align="left">
                               <asp:TextBox ID="txtVipEmpID" runat="server"></asp:TextBox>
                                <asp:Button ID="btnOpenIns0" runat="server" style="width: 23px" Text="..." />
                            </td>
                            <td align="right">
                               <asp:Label ID="lblVipAgent" runat="server" meta:resourcekey="lblVipAgent"></asp:Label>
                            </td>
                            <td align="left">
                               <asp:TextBox ID="txtVipAgent" runat="server"></asp:TextBox>
                                <asp:Button ID="btnOpenIns" runat="server" style="width: 23px" Text="..." />
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="4">
                                <asp:Button ID="btnVipSave" runat="server" Text="<%$ Resources:Save%>" />
                                <asp:Button ID="btnVipCancel" runat="server" Text="<%$ Resources:Cancel%>" />
                            </td>
                        </tr>
                    </table>
                  </asp:Panel>        
                  <asp:Button ID="btnDummy" runat="server" Style="display: none" SkinID="null" />
                  <ajaxToolkit:ModalPopupExtender ID="mpSearch" runat="server" TargetControlID="btnInsert" X="20" Y="60"
                  PopupControlID="panel1" CancelControlID="btnVipCancel" PopupDragHandleControlID="panel1" />
        </contenttemplate>
    </asp:UpdatePanel>
</asp:Content>
